function fn(a, b, c) {
  console.log(this);
  return a + b + c;
}

Function.prototype.mycall = function (context, ...rest) {
  // 这里的this就是 fn 函数
  context.fun = this;
  // context.fun(...ret): 修改了函数调用形式，此时this为context
  const r = context.fun(...rest);
  delete context.fun;
  return r;
};

console.log(fn.mycall({ name: "abc" }, 1, 2, 3));
